/*
 * @Author: thl t15945324431@163.com
 * @Date: 2024-05-10 13:29:08
 * @LastEditors: thl t15945324431@163.com
 * @LastEditTime: 2024-05-13 17:09:14
 * @FilePath: \cw_web\gl\src\views\distribution\withdrawManagement\index.jsx
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
//提现管理
import React from 'react'
import {Tabs} from "antd";
import AllList from "./component/allList";
import WaitList from "./component/waitList";
import {getWithdrawalRecord} from "@/request/distribution/withdrawManagement";

export default class WithdrawManagement extends React.Component {
  state = {
    total: 0
  }
  componentDidMount() {
    this.setTotal()
  }
  setTotal = () => {
    getWithdrawalRecord({
      status: 1
    }).then(res=>{
      if (res.code === 0 && res.data) {
        this.setState({
          total: res.totalCount
        })
      }
      
    })
  }
  render() {
    let { total } = this.state
    return (
      <div className='p-layout-box commodity-content'>
        <Tabs defaultActiveKey="1" destroyInactiveTabPane>
          <Tabs.TabPane tab="日常词库" key="1">
            <AllList history={this.props.history} setTotal={this.setTotal}/>
          </Tabs.TabPane>
          <Tabs.TabPane tab={`情绪词库`} key="2">
            <WaitList history={this.props.history} setTotal={this.setTotal}/>
          </Tabs.TabPane>
        </Tabs>
      </div>
    )
  }
}
